import {addCounter, addToCar} from './mutations-type'

export default {
    [addCounter](state, payload) {
        payload.count += 1
    },
    [addToCar](state, payload) {
        payload.checked = true
        state.carList.push(payload)
    },
    // bb(state,payload) {
    //     state.carList.forEach(item => {
    //         item.checked = false
    //     })
    // },
    // cc(state,payload) {
    //     state.carList.forEach(item => {
    //         item.checked = true
    //     })
    // }
}